<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			/*
			  继承:
			   子类 extends 父类 {
				   constructor(name, age, score) {
				   	 super(name, age);//调用父类构造方法
				   }
			   }
			
			
			*/
			class Person {
				constructor(name, age) {
					this.name = name;
					this.age = age;
				}
			}

			class Student extends Person {
				constructor(name, age, score) {
					super(name, age);
					this.score = score;
				}
			}

			var stu01 = new Student('张三', 20, 98);
			console.log(stu01.n`ame);
			
		</script>
	</body>
</html>
